<?php
	if(isset($_GET['cash']) && isset($_SESSION['uid']))
	{
		if(getGrade() >= 2)
		{
			if(is_numeric($_GET['cash']))
			{
				addPollar($_GET['cash'], $_SESSION['uid']);
				alert("Succesfully added ".$_GET['cash']." Pollars to your account \n Great master.");
				redirect("?page=profile");
			}
			else
			{
				alert("Cash must be numeric.");
			}
		}
		else
		{
			alert("WTF ARE YOU TRYING TO DO?");
		}
	}

	if(isset($_GET['deletetrans']) && isset($_SESSION['uid']))
	{
		if(getGrade() >= 2)
		{
			if(is_numeric($_GET['deletetrans']))
			{
				$id = $_GET['deletetrans'];
				mysql_query("DELETE FROM pank_log WHERE cid='$id'");
			}
			else if($_GET['deletetrans'] == 'all')
			{
				mysql_query("DELETE FROM pank_log");
			}
		}
		else
		{
			alert("WTF ARE YOU TRYING TO DO?");
		}
	}
?>